
file(GLOB_RECURSE SRC_LIST "*.cpp")
foreach(localFile ${SRC_LIST})
  message(${localFile})
endforeach()

file(GLOB_RECURSE HEAD_LIST "*.h")
foreach(localFile ${HEAD_LIST})
  message(${localFile})
endforeach()

if(WIN32)
  include_directories($ENV{MSMPI_INC})
  if(ARCH_X64)
    link_directories($ENV{MSMPI_LIB64})
  else()
    link_directories($ENV{MSMPI_LIB32})
  endif()
elseif(LINUX)
  #find_package(MPI REQUIRED)
  #set(CMAKE_CXX_COMPILER "mpicxx")
  #set(CMAKE_EXE_LINKER_FLAGS "-ldl -lpthread -O3")
  set(CMAKE_EXE_LINKER_FLAGS "-ldl -O3")
else()
endif(WIN32)

add_executable(Client  ${SRC_LIST} ${HEAD_LIST})
target_link_libraries(Client Src)
